#pragma once

#include "agent.h"

#include <vector>

using namespace std;

class C_Application
{
public:
	typedef unsigned int T_PressedKey;


private:
					C_Application(int screenWidth, int screenHeight);					
					~C_Application();

public:

    static C_Application* C_Application::CreateInstance(int screenWidth, int screenHeight) { s_application = new C_Application(screenWidth, screenHeight); return s_application; }
    static C_Application* C_Application::GetInstance() { return s_application; }

					/// Tick is called on fix framerate (50fps)
	void			Tick(T_PressedKey pressedKeys, float fDeltaTime);

    vector<Agent*>&     GetAgentArray() { return m_agentArray; }
    

    static const T_PressedKey s_KeyLeft = 1;
    static const T_PressedKey s_KeyUp = 2;
    static const T_PressedKey s_KeyRight = 4;
    static const T_PressedKey s_KeyDown = 8;
    static const T_PressedKey s_KeySpace = 0x10;


private:

    void                CreateAgents                ( void );

private:

	const int	        m_ScreenWidth;
	const int	        m_ScreenHeight;
    bool                m_bInitialized;
	
	// Members 
    vector<Agent*>     m_agentArray;

    static C_Application* s_application;
};